package com.tencent.qf.web.service.operatelog.impl;

import com.tencent.qf.common.pojo.OperateLogVO;
import com.tencent.qf.system.api.OperateLogApi;
import com.tencent.qf.web.convert.Convert;
import com.tencent.qf.web.service.operatelog.OperateLogWebService;
import lombok.AllArgsConstructor;
import org.springframework.scheduling.annotation.Async;

import javax.annotation.Resource;

/**
 * Copyright (C) 2022 Limited, a Tencent company. All rights reserved.
 *
 * @author p_htaozhou@tencent.com
 * @create: 2022/9/13 15:36
 */
@AllArgsConstructor
public class OperateLogWebServiceImpl implements OperateLogWebService {

    @Resource
    private OperateLogApi operateLogApi;

    @Override
    @Async
    public void saveOperateLogService(OperateLogVO operateLogVO) {
        operateLogApi.createOperateLog(Convert.INSTANCE.apiOperateLogVO2DTO(operateLogVO));
    }
}
